package hotciv.variants;

import hotciv.common.*;
import hotciv.framework.*;
import hotciv.strategies.AttackStrategy;
import hotciv.strategies.MoveUnitStrategy;

public class GammaCivMoveUnitStrategy implements MoveUnitStrategy {

	private MoveUnitStrategy mus = new AlphaCivMoveUnitStrategy();
	
	@Override
	public int distanceBetweenTiles(ModifiableGame game, Position from, Position to) {
		return mus.distanceBetweenTiles(game, from, to);
	}

	@Override
	public boolean isWalkableTile(ModifiableGame game, Position p) {
		return mus.isWalkableTile(game, p);
	}

	@Override
	public boolean unitOccupiedTile(ModifiableGame game, Position p) {
		return mus.unitOccupiedTile(game, p);
	}

	@Override
	public boolean moveUnit(ModifiableGame game, Position from, Position to, AttackStrategy ccs) {
		UnitImpl u = (UnitImpl) game.getUnitAt(from);
		if (u.isMovable() == false) return false;
		
		return mus.moveUnit(game, from, to, ccs);
	}

}
